/**
 * Created with JetBrains PhpStorm.
 * User: Administrator
 * Date: 13-9-26
 * Time: 上午11:16
 * To change this template use File | Settings | File Templates.
 */
function chkBox(chkall,names){
    var chkAllbox = document.getElementById(chkall);
    var boxs = document.getElementsByName(names);
    chkAllbox.onchange = function(){
        for(var i=0;i<boxs.length;i++){
            boxs[i].checked = this.checked;
        }
    };
}